package com.zhuna.www.dao;

import com.zhuna.www.po.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface UserDAO {
    //新增用户
    int add(User user) throws SQLException;
    //更新用户余额
    int updateWalletBalance(Connection conn, int id, double delta) throws SQLException;
    //更新用户信息
    int updateUser(int userId,String newName,String newPassword) throws SQLException;
    //删除用户
    int deleteUser(String name) throws SQLException;
    //查询所有用户
    List<User> selectallUser() throws SQLException;
    //根据用户名查询用户
    User selectUserByName(String name) throws SQLException;
    // 根据用户ID查询钱包余额
    double getWalletBalanceByname(String name) throws SQLException;

}
